package com.abacuslcy.ws001.service;

import javax.xml.ws.Binding;
import javax.xml.ws.Endpoint;

public class DateServiceStartServer {
	public static void main(String[] args) {
		/*
		 * 生成Example 服务实例
		 */
		DateService serverBean = new DateService();
		/*
		 * 发布Web Service到http://localhost:8080/hello地址
		 */
		Endpoint endpoint =
           Endpoint.publish("http://localhost:8080/DateService", serverBean);
		Binding binding = endpoint.getBinding();
//		/*
//		 * 设置一个SOAP协议处理栈
//		 * 这里就简单得打印SOAP的消息文本
//		 */
//		System.out.println(binding.getBindingID());
//		List<Handler> handlerChain = new LinkedList<Handler>();
//		handlerChain.add(new TraceHandler());
//		binding.setHandlerChain(handlerChain);
//		System.out.println("服务已启动 http://localhost:8080/hello");
//		//http://localhost:8080/hello?wsdl
	}
}
